1. Field of the Invention
The present invention generally relates to variable length decoding. More particularly, the present invention relates to systems and methods for storing multiple decode tables to optimize system efficiency.
2. Description of Related Art
Variable length coding (VLC), comprising variable length encoding (VLE) and variable length decoding (VLD), is a popular method used for lossless compression of data. Examples of systems that use VLC based compression-decompression include conventional speech, audio, image and video solutions. Examples of coding applications and standards that use VLC based compression-decompression include file compression utilities such as zip and gzip as well as speech, audio, images and video systems based on standards such as the Advanced Audio Coding (AAC) audio compression standard, MPEG-3 (audio), JPEG, JPEG2000 (images), MPEG-4, and H.264 (video). In many compression/decompression applications, large-sized tables as well as multiple VLC tables are used for efficient data compression. Size limitations on available fast-memory in decoder systems often render it impossible to accommodate an entire set of tables. Consequently, system performance and efficiency is frequently compromised in many conventional systems.
VLC can offer significant compression benefits over fixed length coding (FLC) n the following example as illustrated in Table 1. In the example, a source X has a four symbol alphabet denoted by the letter codes A, B, C, and D. As shown in Table 1, each symbol has an associated probability of occurrence and binary representations are provided for the letter codes.
TABLE 1Encoder code book for fixed length code with codewordlength of 2 bits.SYMBOLPROBABILITYFLCA0.5000B0.2501C0.12510D0.12511Thus, under FLC schemes, an average codeword length of two is obtained because every symbol uses a binary codeword of length 2.
Table 2 illustrates a VLC based encoder codebook in which shorter code-length codes are assigned to higher probability symbols.
TABLE 2Encoder code book for a Variable length code.Average codeword length is 1.75 bits.SYMBOLPROBABILITYFLCA0.500B0.2510C0.125110D0.125111In this case the average codeword length is given by:ACL=(0.5×1)+(0.25×2)+(0.125×3)=1.75,thus providing decreased overall storage requirements over FLC. In essence, VLC attains better compression performance than FLC by encoding more likely symbols using smaller length code-words.
In many compression/decompression applications, large-sized tables as well as more than one VLC tables are used for efficient data compression. For example, AAC comprises between 10 and 15 tables, each having a large number of entries. Some of the AAC tables include as many as 300 entries. In many conventional systems encoders switch between different VLC tables based on the raw data presented, in order to efficiently encode the data. The encoder communicates switching decisions to the decoder through the bit-stream itself, so that the decoder can maintain synchronization with the encoder. However, commercial products that contain such speech, audio, image, and video solutions often have only limited fast-memory resources in the interest of maintaining minimal system costs and can accommodate only a portion of all required tables in fast-memory. Therefore, in conventional commercial products system performance is often limited by the use of slow-memory in decoding.